/*
 * @Author: 李家磊
 * @Date: 2022-03-18 13:27:02
 * @LastEditTime: 2022-03-24 15:44:07
 * @LastEditors: 李家磊
 * @Description:
 * @FilePath: /CURD/src/services/Users/index.ts
 */
import { request } from "umi";


export async function addUsers(data: API.Users){
  return await request('http://127.0.0.1:9000/users/add',{
    method: 'POST',
    data: data
  })
}

export async function queryUsers(params?: any){
  return await request('http://127.0.0.1:9000/users/page',{
    method: 'POST',
    headers: {
      "Content-Type":"application/x-www-form-urlencoded"
    },
      params
  })
}

export async function deleteUsers(data: API.Users){
  return await request('http://127.0.0.1:9000/users/delete',{
    method: 'POST',
    data: data
  })
}

export async function updateUsers(data: API.Users){
  return await request('http://127.0.0.1:9000/users/update',{
    method: 'POST',
    data: data
  })
}


